package com.financing.platform.dao.impl;

import java.sql.SQLException;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IEmailTemplateDao;
import com.financing.platform.dto.EmailTemplateDTO;
import com.financing.platform.util.SqlName;

@Repository("emailTemplateDaoImpl")
public class EmailTemplateDaoImpl extends BaseDaoImpl implements
		IEmailTemplateDao {

	@Override
	public EmailTemplateDTO queryTemplateByType(String ttype) {
		try {
			return (EmailTemplateDTO) this.sqlMapClient.queryForObject(SqlName.queryEmailTemplateByType, ttype);
		} catch (SQLException e) {
			log.error("queryTemplateByType error !", e);
			e.printStackTrace();
		}
		return null;
	}

}
